package com.config;

import java.util.ArrayList;
import java.util.List;

import org.ajaxanywhere.AAFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 
 * Description: TODO  <br/>
 * Date: 2022年8月15日 下午7:30:02 <br/>
 *
 * @author wangbing
 */

@Configuration
public class FilterConfig {
	// https://blog.csdn.net/momomoge/article/details/7333327
	@Bean
	public FilterRegistrationBean<AAFilter> filterRegistration() {
		var registration = new FilterRegistrationBean<AAFilter>();
		registration.setFilter(new AAFilter());
		List<String> urlList = new ArrayList<String>();
		urlList.add("/*");
		registration.setUrlPatterns(urlList);
		registration.setName("ajaxAnywhere");
//		registration.setOrder(1);
		return registration;
	}

	
	

	
}
